import webapp2
from Model import *
import datetime
from google.appengine.ext import ndb
import logging
from NotificationsUtils import *



class EndRaceHandler(webapp2.RequestHandler):

    def post(self):
        race_key = ndb.Key('Race',int(self.request.POST.get('key')))
        race = race_key.get()
        race.Status = RaceStatus.Finished
        race.put()

